Repository navigation
[PR] fix(persist): #7670 warn on cold load when the [acp-drift] fold-coverage alert is off - #7673
ranxianglei wants to merge 1 commit into
Conversation
…age alert is off The pendingFoldUsage latch is intentionally NOT restored on cold load (#2129 triage), so the [acp-drift] fold-coverage alert is off on the first post-load request — the exact round that could destroy the fold (client resends mutated/truncated history losing covered ids → block silently active:false, no log). buildSession now warns whenever a session with active fold blocks is loaded, so the operator knows the alert is off. Latch restoration behavior is unchanged (Option B stopgap from #7670; the proper fix — re-deriving the latch — is a separate design decision). Test: tests/persist-fold-latch-warn.test.ts pins both directions (active blocks ⇒ warn fires; no/inactive blocks ⇒ warn stays silent).
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.11819-pr.7673.4e2f31aThis exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr7673.tgz
npm install -g packageInstall instructions are refreshed on each push. |
[bot] 🏷 Duplicate screening: Not a duplicate — #7673 is the only open PR for the #7669 fold-coverage-alert gap (no parallel PR found). Review of PR #7673 — Option B stopgap for #7669: warn on cold load when the Code — correct. The Tests — real teeth (Gate Test Discipline #3617, both directions): positive (active block ⇒ warn fires, names the session id + "1 active fold block", and asserts the latch is CI — green. Final run 15:11–15:19Z: all 12 test shards (ubuntu/windows × 22/24) + gates = success, 0 failures. The 38 🔴 BLOCKING — wrong issue reference (must fix before merge): The title, body, and commit message all cite #7670, but the real source issue is GitHub #7669. GitHub #7670 is a different PR ("fix: log mid-stream abort origin"). Root cause: #7669 was mirrored from ework issue #7670 (see the Minor — behind master: the branch is behind current master; update/rebase before merge so CI re-runs on the current base. Labels (recommended; the mirror shim doesn't expose the label endpoint, so I couldn't apply them programmatically): 8问(PR #7673 审核结论)
收工判定:代码与测试正确、CI 绿;但 |
What
The
pendingFoldUsagelatch is intentionally NOT restored on cold load (src/persist.ts:4308-4313, #2129 triage), so the[acp-drift]fold-coverage alert (thefoldCoveredBeforegate in all fourprepare-*files) is off on the first post-load request — the exact round that could destroy the fold (client resends mutated/truncated history losing covered ids → block silentlyactive:false, no log).This is Option B from #7670 — the no-decision-dependency stopgap:
buildSessionnow warns whenever a session with active fold blocks is loaded, so the operator knows the alert is off. The latch restoration behavior is unchanged (no false-positive risk; the existing #2129 comment's concern about mislabeling an unrelated post-reload report is untouched).Why Option B now
warninstead of silence.buildSession(the single choke point for all 16 load paths: cold load, fork, recovery, unified-store, legacy).Behavior change
None. The latch is still not restored. The only new output is a
warnlog line on cold load of a session with active fold blocks:Test
tests/persist-fold-latch-warn.test.tspins both directions (Gate Test Discipline #3617):Labels
bug(observability gap in a critical path — the alert that should catch fold destruction is silently off)p2(the tool is still usable; the gap is that a specific failure mode goes unlogged, not that the tool is broken)scope/kernel(fold-ledger / context-management core logic)Closes #7670